<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ts_category.*" %>
<%@page import="java.util.*" %>
<%
	String s_title = "";
	if(request.getParameter("s_title")!=null){
		  s_title = request.getParameter("s_title");

	}
 	
	String s_class_type="2";
 
  if(request.getParameter("class_type")!=null)
  {
		 s_class_type = request.getParameter("class_type");
 
	}

	String up_classId="";
	if (request.getParameter("up_classId") != null && !request.getParameter("up_classId").equals("")) {
		up_classId = request.getParameter("up_classId");
	}else{
	    up_classId="000000000000000";
	}

	String iStart = "0";
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
   
   String object_name="",  para ="/program/admin/category/index.jsp?s_title="+s_title+"&class_type="+s_class_type+"&up_classId="+up_classId+"&iStart="+Integer.parseInt(iStart);	
 if(s_class_type.equals("2")){
  object_name="商品";  
  para ="/program/admin/category/index.jsp?s_title="+s_title+"&class_type="+s_class_type+"&up_classId="+up_classId+"&iStart="+Integer.parseInt(iStart);	
  } 
  else if(s_class_type.equals("1"))
  {  
      object_name="企业";  
	  para ="/program/admin/category/index.jsp?s_title="+s_title+"&class_type="+s_class_type+"&up_classId="+up_classId+"&iStart="+Integer.parseInt(iStart);	 
  } 
  else if(s_class_type.equals("3"))
  {
   object_name="专题"; 
      para ="/program/admin/category/index.jsp?s_title="+s_title+"&class_type="+s_class_type+"&up_classId="+up_classId+"&iStart="+Integer.parseInt(iStart);	   
  }
  else if(s_class_type.equals("7"))
  {
   object_name="问答"; 
      para ="/program/admin/category/index.jsp?s_title="+s_title+"&class_type="+s_class_type+"&up_classId="+up_classId+"&iStart="+Integer.parseInt(iStart);	   
  }
   
	%>
<html>
  <head>
    <title><%=object_name%>分类管理</title>
		<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
		<script language="javascript" type="text/javascript" src="/program/admin/category/js_category.js"></script>
		<script type="text/javascript" src="/program/admin/js/judgment.js" charset="UTF-8"></script>
</head>

<body>

  <% 
  	String cat_id="";
  	if(request.getParameter("cat_id")!=null) cat_id = request.getParameter("cat_id");
  	Ts_categoryInfo ts_categoryInfo = new Ts_categoryInfo();
  	List list = ts_categoryInfo.getListByPk(cat_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	String cat_name="",up_cat_id="",cat_level="",class_type="",is_dis="",sort_no="",rsrv_str1="",rsrv_str2="",rsrv_str3="",remark="";
  	if(map.get("cat_name")!=null) cat_name = map.get("cat_name").toString();
  	if(map.get("up_cat_id")!=null) up_cat_id = map.get("up_cat_id").toString();
  	if(map.get("cat_level")!=null) cat_level = map.get("cat_level").toString();
  	if(map.get("class_type")!=null) class_type = map.get("class_type").toString();
  	if(map.get("is_dis")!=null) is_dis = map.get("is_dis").toString();
  	if(map.get("sort_no")!=null) sort_no = map.get("sort_no").toString();
  	if(map.get("remark")!=null) remark = map.get("remark").toString();
    String  obj_name="";
		if(class_type.equals("2")){
		      obj_name="商品";  
		  } 
		  else if(class_type.equals("1"))
		  {
		      obj_name="企业";   
		  }
		  else if(class_type.equals("3"))
		  {
		      obj_name="专题";   
		  } 
  %>
	
	<h1>修改<%=obj_name%>分类</h1>
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table width="100%" cellpadding="1" cellspacing="1" border="0"  class="listtab" >
		
		<tr>
			<td align="right" width="20%">
				分类名称<font color="#FF0000">*</font>
			</td>
			<td><input name="cat_name" id="cat_name" value="<%=cat_name %>" type="text" maxlength="100" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this); "/></td>
		</tr>
		
	 
	  <input name="up_cat_id" id="up_cat_id" value="<%=up_cat_id %>" type="hidden" />
		<input name="cat_level" id="cat_level" value="<%=cat_level %>" type="hidden" />
    <input name="class_type" id="class_type" value="<%=class_type %>" type="hidden" /></td>

		
		<tr>
			<td align="right" width="20%">
				是否前台显示:
			</td>
			<td>
				
				<input name="is_dis" id="is_dis1" type="radio" value="0" <%if(is_dis.equals("0"))out.print("checked");%>/>显示
				<input name="is_dis" id="is_dis2" type="radio" value="1" <%if(is_dis.equals("1"))out.print("checked");%>/>不显示

				
				</td>
		</tr>
		
		<tr>
			<td align="right" width="20%">
				显示顺序:
			</td>
			<td><input name="sort_no" id="sort_no" value="<%=sort_no %>" type="text" onkeyup="value=value.replace(/[^\d]/g,'')" onbeforepaste="clearSBC()" maxlength="4"/></td>
		</tr>
		
		<tr>
			<td align="right" width="20%">
				备注:
			</td>
			<td><input name="remark" id="remark" value="<%=remark %>" type="text" maxlength="500" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this); "/></td>
		</tr>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="4205" />
				<input type="hidden" name="jumpurl" value="<%=para%>" />
	  			<input type="hidden" name="cat_id" value="<%=cat_id %>" />
				<input type="button"  class="buttoncss" name="tradeSub" value="提交"  onclick="subForm();" />&nbsp;&nbsp;
				<input type="button"  class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='<%=para%>';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
